package cn.rulian.one.log.bo;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

import com.fasterxml.jackson.annotation.JsonFormat;

import cn.rulian.base.common.bo.BaseBo;

/**
 * Description: 操作日志
 */
@Entity
@Table(name = "one_log_opelog")
public class OpeLog extends BaseBo {
	

	public static String LEVEL_INFO = "info"; //
	public static String LEVEL_WARN = "warn"; //
	public static String LEVEL_ERROR = "error"; //

	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") 
	private Date addTime = new Date(); //时间
	
	@Column(length = 30)
	private String type; //类型（大类）
	
	@Column(length = 30)
	private String typeTwo; //类别（小类）

	@Column(length = 20)
	private String level = LEVEL_INFO; //日志级别
	
	@Column(length = 100)
	private String businessId; //业务数据标识

	private String msg; //日志信息

	@Lob
	@Basic(fetch = FetchType.LAZY)   
	@Type(type="text")  
	private String ext; //扩展说明，用于存放大数据。

	public Date getAddTime()
	{
		return addTime;
	}

	public void setAddTime(Date addTime)
	{
		this.addTime = addTime;
	}

	public String getType()
	{
		return type;
	}

	public void setType(String type)
	{
		this.type = type;
	}

	public String getTypeTwo()
	{
		return typeTwo;
	}

	public void setTypeTwo(String typeTwo)
	{
		this.typeTwo = typeTwo;
	}

	public String getLevel()
	{
		return level;
	}

	public void setLevel(String level)
	{
		this.level = level;
	}

	public String getBusinessId()
	{
		return businessId;
	}

	public void setBusinessId(String businessId)
	{
		this.businessId = businessId;
	}

	public String getMsg()
	{
		return msg;
	}

	public void setMsg(String msg)
	{
		this.msg = msg;
	}

	public String getExt()
	{
		return ext;
	}

	public void setExt(String ext)
	{
		this.ext = ext;
	}

}
